package com.lwq.rabbitmq;

import com.lwq.rabbitmqutil.RabbitMqConstant;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListener(queuesToDeclare = @Queue(RabbitMqConstant.QUEUE_A))
public class OrderInsertConumser {


    @RabbitHandler
    public void consume(Map<String, Object> msg) {
        System.out.println("消费到消息: " + msg);
    }
}
